package com.seu.me.disruptor.generate2;

import com.seu.me.disruptor.generate1.Trade;
import com.lmax.disruptor.EventHandler;

/**
 * Created by liangfeihu on 2017/11/27.
 */
public class Handler2 implements EventHandler<Trade> {

    @Override
    public void onEvent(Trade event, long sequence, boolean endOfBatch) throws Exception {
        System.out.println("eventId=" + event.getId() + ", handler2: set price");
        event.setPrice(17.0);
        Thread.sleep(1000);
    }

}  